package 集合.日常使用;

import java.util.Date;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Description
 *
 * @Author: SunAo
 * @Date: 2021/3/1 16:39
 */
public class ConcurrentHashmap深入学习 {


    ConcurrentHashMap<String,String> concurrentHashMap = new ConcurrentHashMap<>();

    public static long getSimuid(Date createTime, int id) {
        int timestamp = (int) (createTime.getTime() / 1000);
        long simuid = (((long) timestamp) << 32) | (long) id;
        return simuid;
    }

    public static void main(String[] args) {
        System.out.println(getSimuid(new Date(),212229822));
    }
}
